#include <iostream>
#include <vector>

using namespace std;

vector<int> singleNumber(vector<int>& nums)
{
    int sum = 0;
    for (auto num : nums)
    {
        sum ^= num;
    }
    int l = sum & sum * (-1);
    int Answer1 = 0;
    int Answer2 = 0;

    for (auto num : nums)
    {
        if ((num & l) == 0)
        {
            Answer1 ^= num;
        }
        else
        {
            Answer2 ^= num;
        }
    }
    vector<int> ret = { Answer1, Answer2 };
    return ret;

}
int main()
{
    vector<int > vi = { 1, 1, 0, -2147483648 };

	
    singleNumber(vi);
	




	
	
	
	return 0;

}